import {Component, STATE, ATTRIBUTE,createElement} from './framework'
import {enabledGesture} from './gesture'

export {STATE, ATTRIBUTE} from './framework'

// 实现内容children
export class List extends Component{
  constructor(){
    super()
  }

  render(){
    console.log("template=================")
    console.log(this.template)
    console.log("this[ATTRIBUTE].data=================")
    console.log(this[ATTRIBUTE].data)
    this.children = this[ATTRIBUTE].data.map(this.template);
    console.log("children=================")
    console.log(this.children)
    this.root = (<div>{this.children}</div>).render()
    return this.root
  }

  // 重载
  appendChild(child){
    this.template = (child)
    this.render()
  }

}